package com.woniuxy.qiantai.controller;


import com.woniuxy.qiantai.entity.China;
import com.woniuxy.qiantai.service.ChinaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author woniumrwang
 * @since 2023-01-06 02:44:36
 */
@RestController
@RequestMapping("/china")
public class ChinaController {

    @Autowired
    ChinaService chinaService;

    @RequestMapping("queryList")
    public List<China> queryList(Integer pid){
        //约定: pid为0时查询的是省份.

        List<China> result = chinaService.queryList(pid);

        return result;
    }




}

